/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.ronsicecream.pos.master.unit;

import com.buanalintas.bynga.Field;
import com.buanalintas.bynga.Page;
import com.ronsicecream.pos.entities.PosMasterRasa;
import com.ronsicecream.pos.entities.PosMasterUnit;

/**
 *
 * @author user
 */
public class PosUnit extends Page {

    private Field unitId;
    private Field unitName;
    private Field unitDescription;
    private Field unitUnitTypeId;
    private Field unitUnitId;
    private Field unitRegionalId;

    public PosUnit() {
        super();

        setTheClass(PosMasterUnit.class);




        unitId = new Field();
        unitId.setName("unitId");
        unitId.setCaption("id");
        //regionalId.setInfo("regional id");
        unitId.setListProperties(" align=\"left\" width=\"1%\" nowrap");
        unitId.setInputProperties(" size=\"20\"");
        getFields().add(unitId);
        
        unitUnitId = new Field();
        unitUnitId.setName("unitUnitId");
        unitUnitId.setCaption("unit");
        //regionalName.setInfo("regional name");
        unitUnitId.setListProperties(" align=\"left\" width=\"60%\" nowrap");
        unitUnitId.setInputProperties(" size=\"30\"");
        unitUnitId.setRequired(true);
        getFields().add(unitUnitId);
        
        unitUnitTypeId = new Field();
        unitUnitTypeId.setName("unitUnitTypeId");
        unitUnitTypeId.setCaption("type");
        //unitUnitTypeId.setInfo("regional name");
        unitUnitTypeId.setListProperties(" align=\"left\" width=\"60%\" nowrap");
        unitUnitTypeId.setInputProperties(" size=\"30\"");
        unitUnitTypeId.setRequired(true);
        getFields().add(unitUnitTypeId);
        
        unitRegionalId = new Field();
        unitRegionalId.setName("unitRegionalId");
        unitRegionalId.setCaption("regional");
        //regionalName.setInfo("regional name");
        unitRegionalId.setListProperties(" align=\"left\" width=\"60%\" nowrap");
        unitRegionalId.setInputProperties(" size=\"30\"");
        unitRegionalId.setRequired(true);
        getFields().add(unitRegionalId);

        unitName = new Field();
        unitName.setName("unitName");
        unitName.setCaption("name");
        //regionalName.setInfo("regional name");
        unitName.setListProperties(" align=\"left\" width=\"60%\" nowrap");
        unitName.setInputProperties(" size=\"30\"");
        unitName.setRequired(true);
        getFields().add(unitName);

        unitDescription = new Field();
        unitDescription.setName("unitDescription");
        unitDescription.setCaption("description");
        unitDescription.setListProperties(" align=\"left\" width=\"35%\" nowrap");
        unitDescription.setInputProperties(" rows=\"5\"cols=\"50\"");
        unitDescription.setInputType(Field.INPUT_TEXT_AREA);
//        unitDescription.setRequired(true);
        unitDescription.setInputCase(Field.CASE_UPPER);
        getFields().add(unitDescription);

        fillFields();
        setExportList(getClass().getResourceAsStream("RegionalList.jasper"));
        setExport(getClass().getResourceAsStream("Regional.jasper"));

        getFieldsAdd().remove(unitId);
        getFieldsEdit().remove(unitId);
        getFieldsList().remove(unitId);
        getFieldsView().remove(unitId);
    }
}
